package com.gxsyh.nantie.user.management.provider.service;

import com.gxsyh.nantie.user.management.provider.domain.TbDepartment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @email yom535@outlook.com
 * @author: 刘锋嘉(Liu Fengjia)
 * @date: 2020/1/6
 * @time: 11:48
 * @Description:
 */
public interface TbDepartmentService {
    /**
     * 通过自己部门的ID查询子集的部门
     * @param id
     * @return
     */
    List<TbDepartment> queryingSubsetDepartmentsId(Long id);

    /**
     * 向一个部门添加子部门
     */
    int insterDepartment(Long id,Long mainDepartmentId,String addedDepartment,int type);
    /**
     * 通过父级ID查询所有下级部门
     * @param parentId 父级ID
     * @return 所有下级部门
     */
    List<TbDepartment> selectSubsetDepartment(Long parentId);
    /**
     * 通过部门Id查询所有上级部门
     */
    List<TbDepartment> selectParentDepartment(Long parentId);

    /**
     * 通过自己公寓的ID查询子集的公寓
     */
    List<TbDepartment> queryingSubsetApartmentId(Long id);

}

